]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
telepathyClient: give a separate style to TpLogger messages
authorJasper St. Pierre <jstpierre@mecheye.net>
Thu, 24 Mar 2011 11:11:17 +0000 (07:11 -0400)
committerOwen W. Taylor <otaylor@fishsoup.net>
Tue, 29 Mar 2011 03:05:55 +0000 (23:05 -0400)
Sometimes, log messages are hard to differentiate from normal,
unread recent messages, so give a separate style to messages
retrieved from the TelepathyLogger service.

https://bugzilla.gnome.org/show_bug.cgi?id=645609

data/theme/gnome-shell.css
js/ui/telepathyClient.js

index e9aefb15a4d6a23aa01f0d3cdd402a2ce62be9c5..204505381c02c29f935e30c3aef31c1c88c9f7bb 100644 (file)
@@ -1100,6 +1100,10 @@ StTooltip StLabel {
     icon-size: 36px;
 }
 
+.chat-log-message {
+    color: #888888;
+}
+
 .chat-received {
     background-gradient-direction: horizontal;
     background-gradient-start: rgba(255, 255, 255, 0.2);
index cc653e7fdb1becc67b462d5cd1e284d8c29886f6..0b33e86027c28f9240b6fd26ee86b6bb6df3da18 100644 (file)
@@ -267,7 +267,7 @@ Source.prototype = {
 
             if (!isPending) {
                 showTimestamp = true;
-                this._notification.appendMessage(logMessage, true);
+                this._notification.appendMessage(logMessage, true, ['chat-log-message']);
             }
         }
 
@@ -403,10 +403,12 @@ Notification.prototype = {
      * @noTimestamp: Whether to add a timestamp. If %true, no timestamp
      *   will be added, regardless of the difference since the
      *   last timestamp
+     * @styles: A list of CSS class names.
      */
-    appendMessage: function(message, noTimestamp) {
+    appendMessage: function(message, noTimestamp, styles) {
         let messageBody = GLib.markup_escape_text(message.text, -1);
-        let styles = [message.direction];
+        styles = styles || [];
+        styles.push(message.direction);
 
         if (message.messageType == Tp.ChannelTextMessageType.ACTION) {
             let senderAlias = GLib.markup_escape_text(message.sender, -1);